351. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2021-05-13 09:09:14 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

351.1 Files compared

#LocationFileLast Modified
1/Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/web/jstheme.js2019-10-22 09:22:12 +0000
2/Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/web/jstheme.js2021-05-01 08:24:04 +0000

351.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged12382
Changed518
Inserted34
Removed3115

351.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

351.4 Active regular expressions

No regular expressions were active.

351.5 Comparison detail

1 /** 1 /**
2  * Copyright © 2015 Magento. All rights reserved. 2  * Copyright © 2015 Magento. All rights reserved.
3  * See COPYING.txt for license details. 3  * See COPYING.txt for license details.
4  */ 4  */
5 //require([    
6 //    'jquery',    
7 //    'bootstrap/js/bootstrap.min'    
8 //], function ($) {    
9     
10 //});    
11 require([ 5 require([
12     'jquery', 6     'jquery',
13     'mage/smart-keyboard-handler', 7     'mage/smart-keyboard-handler',
14     'mage/mage', 8     'mage/mage',
15     'mage/ie-class-fixer', 9     'mage/ie-class-fixer',
16     'domReady!' 10     'domReady!'
17 ], function ($, keyboardHandler) { 11 ], function ($, keyboardHandler) {
18     'use strict'; 12     'use strict';
19     $(document).ready(function(){ 13     $(document).ready(function(){
20         $('.cart-summary').mage('sticky', { 14         $('.cart-summary').mage('sticky', {
21             container: '#maincontent' 15             container: '#maincontent'
22         }); 16         });
23  17 
24         $('.panel.header .header.links').clone().appendTo('#store\\.links'); 18         $('.panel.header .header.links').clone().appendTo('#store\\.links');
25     }); 19     });
26     keyboardHandler.apply(); 20     keyboardHandler.apply();
27 }); 21 });
28 /******************** Init Parallax ***********************/    
29 require([    
30     'jquery',    
31     'js/jquery.stellar.min'    
32 ], function ($) {    
33     $(document).ready(function(){    
34         $(window).stellar({    
35             responsive: true,    
36             scrollProperty: 'scroll',    
37             parallaxElements: false,    
38             horizontalScrolling: false,    
39             horizontalOffset: 0,    
40             verticalOffset: 0    
41         });    
42     });    
43 });    
44     
45 require([ 22 require([
46     'jquery' 23     'jquery'
47 ], function ($) { 24 ], function ($) {
48     (function() { 25     (function() {
49         var ev = new $.Event('classadded'), 26         var ev = new $.Event('classadded'),
50             orig = $.fn.addClass; 27             orig = $.fn.addClass;
51         $.fn.addClass = function() { 28         $.fn.addClass = function() {
52             $(this).trigger(ev, arguments); 29             $(this).trigger(ev, arguments);
53             return orig.apply(this, arguments); 30             return orig.apply(this, arguments);
54         } 31         }
55     })(); 32     })();
56     $.fn.extend({ 33     $.fn.extend({
57         scrollToMe: function(){ 34         scrollToMe: function(){
58             if($(this).length){ 35             if($(this).length){
59                 var top = $(this).offset().top - 100; 36                 var top = $(this).offset().top - 100;
60                 $('html,body').animate({scrollTop: top}, 300); 37                 $('html,body').animate({scrollTop: top}, 300);
61             } 38             }
62         }, 39         },
63         scrollToJustMe: function(){ 40         scrollToJustMe: function(){
64             if($(this).length){ 41             if($(this).length){
65                 var top = jQuery(this).offset().top; 42                 var top = jQuery(this).offset().top;
66                 $('html,body').animate({scrollTop: top}, 300); 43                 $('html,body').animate({scrollTop: top}, 300);
67             } 44             }
68         } 45         }
69     }); 46     });
70     $(document).ready(function(){ 47     $(document).ready(function(){
71         var windowScroll_t; 48         var windowScroll_t;
72         $(window).scroll(function(){ 49         $(window).scroll(function(){
73             clearTimeout(windowScroll_t); 50             clearTimeout(windowScroll_t);
74             windowScroll_t = setTimeout(function(){ 51             windowScroll_t = setTimeout(function(){
75                 if(jQuery(this).scrollTop() > 100){ 52                 if(jQuery(this).scrollTop() > 100){
76                     $('#totop').fadeIn(); 53                     $('#totop').fadeIn();
77                 }else{ 54                 }else{
78                     $('#totop').fadeOut(); 55                     $('#totop').fadeOut();
79                 } 56                 }
80             }, 500); 57             }, 500);
81         }); 58         });
82         $('#totop').off("click").on("click",function(){ 59         $('#totop').off("click").on("click",function(){
83             $('html, body').animate({scrollTop: 0}, 600); 60             $('html, body').animate({scrollTop: 0}, 600);
84         }); 61         });
85         if ($('body').hasClass('checkout-cart-index')) { 62         if ($('body').hasClass('checkout-cart-index')) {
86             if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) { 63             if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) {
87                 $('#block-shipping').on('collapsiblecreate', function () { 64                 $('#block-shipping').on('collapsiblecreate', function () {
88                     $('#block-shipping').collapsible('forceActivate'); 65                     $('#block-shipping').collapsible('forceActivate');
89                 }); 66                 });
90             } 67             }
91         } 68         }
92         $(".products-grid .weltpixel-quickview").each(function(){ 69         $(".products-grid .weltpixel-quickview").each(function(){
93             $(this).appendTo($(this).parent().parent().children(".product-item-photo")); 70             $(this).appendTo($(this).parent().parent().children(".product-item-photo"));
94         });  71         });
95         $(".word-rotate").each(function() { 72         $(".word-rotate").each(function() {
96  73 
97             var $this = $(this), 74             var $this = $(this),
98                 itemsWrapper = $(this).find(".word-rotate-items"), 75                 itemsWrapper = $(this).find(".word-rotate-items"),
99                 items = itemsWrapper.find("> span"), 76                 items = itemsWrapper.find("> span"),
100                 firstItem = items.eq(0), 77                 firstItem = items.eq(0),
101                 firstItemClone = firstItem.clone(), 78                 firstItemClone = firstItem.clone(),
102                 itemHeight = 0, 79                 itemHeight = 0,
103                 currentItem = 1, 80                 currentItem = 1,
104                 currentTop = 0; 81                 currentTop = 0;
105  82 
106             itemHeight = firstItem.height(); 83             itemHeight = firstItem.height();
107  84 
108             itemsWrapper.append(firstItemClone); 85             itemsWrapper.append(firstItemClone);
109  86 
110             $this 87             $this
111                 .height(itemHeight) 88                 .height(itemHeight)
112                 .addClass("active"); 89                 .addClass("active");
113  90 
114             setInterval(function() { 91             setInterval(function() {
115                 currentTop = (currentItem * itemHeight); 92                 currentTop = (currentItem * itemHeight);
116                  93 
117                 itemsWrapper.animate({ 94                 itemsWrapper.animate({
118                     top: -(currentTop) + "px" 95                     top: -(currentTop) + "px"
119                 }, 300, function() { 96                 }, 300, function() {
120                     currentItem++; 97                     currentItem++;
121                     if(currentItem > items.length) { 98                     if(currentItem > items.length) {
122                         itemsWrapper.css("top", 0); 99                         itemsWrapper.css("top", 0);
123                         currentItem = 1; 100                         currentItem = 1;
124                     } 101                     }
125                 }); 102                 });
126                  103 
127             }, 2000); 104             }, 2000);
128  105 
129         }); 106         });
130         $(".top-links-icon").off("click").on("click", function(e){ 107         $(".top-links-icon").off("click").on("click", function(e){
131             if($(this).parent().children("ul.links").hasClass("show")) { 108             if($(this).parent().children("ul.links").hasClass("show")) {
132                 $(this).parent().children("ul.links").removeClass("show"); 109                 $(this).parent().children("ul.links").removeClass("show");
133             } else { 110             } else {
134                 $(this).parent().children("ul.links").addClass("show"); 111                 $(this).parent().children("ul.links").addClass("show");
135             } 112             }
136             e.stopPropagation(); 113             e.stopPropagation();
137         }); 114         });
138         $(".top-links-icon").parent().click(function(e){ 115         $(".top-links-icon").parent().click(function(e){
139             e.stopPropagation(); 116             e.stopPropagation();
140         }); 117         });
141         $(".search-toggle-icon").click(function(e){ 118         $(".search-toggle-icon").click(function(e){
142             if($(this).parent().children(".block-search").hasClass("show")) { 119             if($(this).parent().children(".block-search").hasClass("show")) {
143                 $(this).parent().children(".block-search").removeClass("show"); 120                 $(this).parent().children(".block-search").removeClass("show");
    121                 $(this).removeClass('open');
144             } else { 122             } else {
145                 $(this).parent().children(".block-search").addClass("show"); 123                 $(this).parent().children(".block-search").addClass("show");
    124                 $(this).addClass('open');
146             } 125             }
147             e.stopPropagation(); 126             e.stopPropagation();
148         }); 127         });
149         $(".search-toggle-icon").parent().click(function(e){ 128         $(".search-toggle-icon").parent().click(function(e){
150             e.stopPropagation(); 129             e.stopPropagation();
151         }); 130         });
152         $("html,body").click(function(){ 131         $("html,body").click(function(){
153             $(".search-toggle-icon").parent().children(".block-search").removeClass("show"); 132             $(".search-toggle-icon").parent().children(".block-search").removeClass("show");
    133             $('.autocomplete-suggestions').hide();
    134             $(".search-toggle-icon").removeClass('open');
154             $(".top-links-icon").parent().children("ul.links").removeClass("show"); 135             $(".top-links-icon").parent().children("ul.links").removeClass("show");
155         }); 136         });
156  137 
157         /********************* Qty Holder **************************/ 138         /********************* Qty Holder **************************/
158         $(document).on("click", ".qtyplus", function(e) { 139         $(document).on("click", ".qtyplus", function(e) {
159             // Stop acting like a button 140             // Stop acting like a button
160             e.preventDefault(); 141             e.preventDefault();
161             // Get its current value 142             // Get its current value
162             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); 143             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val());
163             // If is not undefined 144             // If is not undefined
164             if (!isNaN(currentVal)) { 145             if (!isNaN(currentVal)) {
165                 // Increment 146                 // Increment
166                 $(this).parents('form').find('input[name="qty"]').val(currentVal + 1); 147                 $(this).parents('form').find('input[name="qty"]').val(currentVal + 1);
167             } else { 148             } else {
168                 // Otherwise put a 0 there 149                 // Otherwise put a 0 there
169                 $(this).parents('form').find('input[name="qty"]').val(0); 150                 $(this).parents('form').find('input[name="qty"]').val(0);
170             } 151             }
171         }); 152         });
172         // This button will decrement the value till 0 153         // This button will decrement the value till 0
173         $(document).on("click", ".qtyminus", function(e) { 154         $(document).on("click", ".qtyminus", function(e) {
174             // Stop acting like a button 155             // Stop acting like a button
175             e.preventDefault(); 156             e.preventDefault();
176             // Get the field name 157             // Get the field name
177             fieldName = $(this).attr('field'); 158             fieldName = $(this).attr('field');
178             // Get its current value 159             // Get its current value
179             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); 160             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val());
180             // If it isn't undefined or its greater than 0 161             // If it isn't undefined or its greater than 0
181             if (!isNaN(currentVal) && currentVal > 0) { 162             if (!isNaN(currentVal) && currentVal > 0) {
182                 // Decrement one 163                 // Decrement one
183                 $(this).parents('form').find('input[name="qty"]').val(currentVal - 1); 164                 $(this).parents('form').find('input[name="qty"]').val(currentVal - 1);
184             } else { 165             } else {
185                 // Otherwise put a 0 there 166                 // Otherwise put a 0 there
186                 $(this).parents('form').find('input[name="qty"]').val(0); 167                 $(this).parents('form').find('input[name="qty"]').val(0);
187             } 168             }
188         }); 169         });
189         $(".qty-inc").unbind('click').click(function(){ 170         $(".qty-inc").unbind('click').click(function(){
190             if($(this).parents('.field.qty
').find("input.input-text.qty").is(':enabled')){
 171             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){
191                 $(this).parents('.field.qty
').find("input.input-text.qty").val((+$(this).parents('.field.qty
').find("input.input-text.qty").val() + 1) || 0);
 172                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val((+$(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() + 1) || 0);
192                 $(this).parents('.field.qty
').find("input.input-text.qty").trigger('change');
 173                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change');
193                 $(this).focus(); 174                 $(this).focus();
194             } 175             }
195         }); 176         });
196         $(".qty-dec").unbind('click').click(function(){ 177         $(".qty-dec").unbind('click').click(function(){
197             if($(this).parents('.field.qty
').find("input.input-text.qty").is(':enabled')){
 178             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){
198                 $(this).parents('.field.qty
').find("input.input-text.qty").val(($(this).parents('.field.qty
').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty
').find("input.input-text.qty").val() - 1) : 0);
 179                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val(($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1) : 0);
199                 $(this).parents('.field.qty
').find("input.input-text.qty").trigger('change');
 180                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change');
200                 $(this).focus(); 181                 $(this).focus();
201             } 182             }
202         }); 183         });
203             
204         /********** Fullscreen Slider ************/    
205         var s_width = $(window).outerWidth();    
206         var s_height = $(window).outerHeight();    
207         var s_ratio = s_width/s_height;    
208         var v_width=320;    
209         var v_height=240;    
210         var v_ratio = v_width/v_height;    
211         $(".full-screen-slider div.item").css("position","relative");    
212         $(".full-screen-slider div.item").css("overflow","hidden");    
213         $(".full-screen-slider div.item").width(s_width);    
214         $(".full-screen-slider div.item").height(s_height);    
215         $(".full-screen-slider div.item > video").css("position","absolute");    
216         $(".full-screen-slider div.item > video").bind("loadedmetadata",function(){    
217             v_width = this.videoWidth;    
218             v_height = this.videoHeight;    
219             v_ratio = v_width/v_height;    
220             if(s_ratio>=v_ratio){    
221                 $(this).width(s_width);    
222                 $(this).height("");    
223                 $(this).css("left","0px");    
224                 $(this).css("top",(s_height-s_width/v_width*v_height)/2+"px");    
225             }else{    
226                 $(this).width("");    
227                 $(this).height(s_height);    
228                 $(this).css("left",(s_width-s_height/v_height*v_width)/2+"px");    
229                 $(this).css("top","0px");    
230             }    
231             $(this).get(0).play();    
232         });    
233         if($(".page-header").hasClass("type10")) {    
234             if(s_width >= 992){    
235                 $(".navigation").addClass("side-megamenu")    
236             } else {    
237                 $(".navigation").removeClass("side-megamenu")    
238             }    
239         }    
240             
241         $(window).resize(function(){    
242             s_width = $(window).innerWidth();    
243             s_height = $(window).innerHeight();    
244             s_ratio = s_width/s_height;    
245             $(".full-screen-slider div.item").width(s_width);    
246             $(".full-screen-slider div.item").height(s_height);    
247             $(".full-screen-slider div.item > video").each(function(){    
248                 if(s_ratio>=v_ratio){    
249                     $(this).width(s_width);    
250                     $(this).height("");    
251                     $(this).css("left","0px");    
252                     $(this).css("top",(s_height-s_width/v_width*v_height)/2+"px");    
253                 }else{    
254                     $(this).width("");    
255                     $(this).height(s_height);    
256                     $(this).css("left",(s_width-s_height/v_height*v_width)/2+"px");    
257                     $(this).css("top","0px");    
258                 }    
259             });    
260             if($(".page-header").hasClass("type10")) {    
261                 if(s_width >= 992){    
262                     $(".navigation").addClass("side-megamenu")    
263                 } else {    
264                     $(".navigation").removeClass("side-megamenu")    
265                 }    
266             }    
267         });    
268         var breadcrumb_pos_top = 0;    
269         $(window).scroll(function(){    
270             if(!$("body").hasClass("cms-index-index")){    
271                 var side_header_height = $(".page-header.type10, .page-header.type22").innerHeight();    
272                 var window_height = $(window).height();    
273                 if(side_header_height-window_height<$(window).scrollTop()){    
274                     if(!$(".page-header.type10, .page-header.type22").hasClass("fixed-bottom"))    
275                         $(".page-header.type10, .page-header.type22").addClass("fixed-bottom");    
276                 }    
277                 if(side_header_height-window_height>=$(window).scrollTop()){    
278                     if($(".page-header.type10, .page-header.type22").hasClass("fixed-bottom"))    
279                         $(".page-header.type10, .page-header.type22").removeClass("fixed-bottom");    
280                 }    
281             }    
282             if($("body.side-header .page-wrapper > .breadcrumbs").length){    
283                 if(!$("body.side-header .page-wrapper > .breadcrumbs").hasClass("fixed-position")){    
284                     breadcrumb_pos_top = $("body.side-header .page-wrapper > .breadcrumbs").offset().top;    
285                     if($("body.side-header .page-wrapper > .breadcrumbs").offset().top<$(window).scrollTop()){    
286                         $("body.side-header .page-wrapper > .breadcrumbs").addClass("fixed-position");    
287                     }    
288                 }else{    
289                     if($(window).scrollTop()<=1){    
290                         $("body.side-header .page-wrapper > .breadcrumbs").removeClass("fixed-position");    
291                     }    
292                 }    
293             }    
294         });    
295     }); 184     });
296 }); 185 });
297 require([ 186 require([
298     'jquery', 187     'jquery',
299     'js/jquery.lazyload' 188     'js/jquery.lazyload'
300 ], function ($) { 189 ], function ($) {
301     $(document).ready(function(){ 190     $(document).ready(function(){
302         $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn"}); 191         $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn"});
303         if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) { 192         if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) {
304             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() { 193             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() {
305                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 194                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
306             }); 195             });
307             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() { 196             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() {
308                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 197                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
309             }); 198             });
310         } 199         }
311         window.setTimeout(function(){ 200         window.setTimeout(function(){
312             $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 201             $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
313         },500); 202         },500);
314     }); 203     });
315 }); 204 });